<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    protected $layoutData;

    public function __construct()
    {

    }

    public function db2vue()
    {
        //TODO
    }

    public function layoutData()
    {
        $arr = [[
            'title'=> '我的收藏',
            'href'=> '/stow'
        ],[
            'title'=> '我的发言',
            'href'=> '/comments'
        ],[
            'title'=> '订阅列表',
            'href'=> '/subscribe'
        ]];
        $alerts[] = ['text'=>'hello', 'type'=>'success'];
        $alerts[] = ['text'=>'hello', 'type'=>'success'];
        $user = [
            'nick'=>'nick',
            'img'=>'http://img3.dwstatic.com/lol/1705/357745914768/1493791442460.jpg'
        ];
//        return view('home')->with(['arr'=>$arr, 'alerts'=>$alerts]);
        return ['arr'=>$arr, 'alerts'=>$alerts, 'user'=>$user];
    }
}
